﻿using server.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using System.Threading.Tasks;



 namespace Restful
{
    [ServiceContract(Name = "ServiceknapsackImp")]
    public interface IknapsackService
    {

        [OperationContract]
        [WebGet(UriTemplate = "CheckGamePlayerTime/{grounpId}", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        string CheckGamePlayerTime(string grounpId);

        [OperationContract]
        [WebGet(UriTemplate = "GetKnapsackInfo/{grounpId}", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        List<Knapsack_Info> GetKnapsackInfo(string grounpId);


        [OperationContract]
        [WebGet(UriTemplate = "GetKnapsackInfoCount/{grounpId}", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        string GetKnapsackInfoCount(string grounpId);

        [OperationContract]
        [WebGet(UriTemplate = "SaveKnapsackInfo/{gameId}/{knapsack_id}/{startTime}/{endTime}/{count}/{addCountValue}",
            BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        string  SaveKnapsackInfo(string gameId,string knapsack_id,string startTime,string endTime, string count,string addCountValue);

        [OperationContract]
        [WebGet(UriTemplate = "DeleteKnapsack/{Id}", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        string DeleteKnapsack(string Id);

        [OperationContract]
        [WebGet(UriTemplate = "ModifyKnapsackInfo/{Id}/{knapsack_id}/{startTime}/{endTime}/{count}/{grounpId}/{addCountValue}",
           BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        string ModifyKnapsackInfo(string Id, string knapsack_id, string startTime, string endTime, string count,string grounpId,string addCountValue);


        [OperationContract]
        [WebGet(UriTemplate = "GetKnapsackById/{Id}", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        string GetKnapsackById(string Id);

        [OperationContract]
        [WebGet(UriTemplate = "GetKnapsackList", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        List<Knapsack> GetKnapsackList();

        [OperationContract]
        [WebGet(UriTemplate = "GetKnapsackDetailList/{game_id}", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        List<Knapsack_Detail> GetKnapsackDetailList(string game_id);


        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "SaveKnapsackDetail", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        string SaveKnapsackDetail(List<Knapsack_Detail> list);


        //[OperationContract]
        //[WebInvoke(Method = "POST", UriTemplate = "LocateKnapsackDetailConfirm", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        //void LocateKnapsackDetailConfirm(UserKnapsack userKnapsack);


        [OperationContract]
        [WebGet(UriTemplate = "StopEnergy/{userId}", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        void StopEnergyTips(string userId);

    }
}
